Skip to content

Conversation

@metalgearsloth
Copy link
Contributor

@metalgearsloth metalgearsloth commented Oct 27, 2025

  1. Avoids allocating the list per proxy that was pretty bad.
  2. Short-circuits inside the parallel FindPairs calls if the other proxy is also in the movebuffer so we don't do the fixture check in AddPair later in the single-threaded part. We also do this on the grid version so it should make grids moving near each other much faster by earlying out a lot earlier.
  3. I wanted to put PreventCollideEvent in here too to get the really expensive one in but >turnstiles
  4. Broadphase expand now checks realistically what it needs to check by considering the entity velocity (could make the bounds tighter by only checking the direction we came from but would rather just catch more collisions for now).

Want to get a profile before marking it as ready.

Old:
image

New:
image

Looks like doing the PreventCollideMessage inside or outside of the hot loop doesn't make a difference if the event itself has no subscribers so I might just leave that out for now to stop content shooting itself.

Moves more stuff into the parallel loop and avoids allocating the list per fixtureproxy.
@metalgearsloth metalgearsloth marked this pull request as ready for review October 27, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant